package cn.suzhang.jsharp.module.sys.dao;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Repository;

import cn.suzhang.jsharp.common.dao.BaseDao;
import cn.suzhang.jsharp.module.sys.entity.SysUser;

/*public interface UserDao extends JpaRepository<SysUser, Long> {

	*//**
		* 自定义SQL查询
		* 
		* @param username
		* @return
		*//*
			@Query(value = "select * from sys_user where username = ? ", nativeQuery = true)
			public List<SysUser> listUsersByUsername(String username);
			
			}*/

/**
 * Repository用于标注数据访问组件
 * 
 * @author suzhang
 *
 */
@Repository
public interface UserDao extends BaseDao<SysUser, Long> {

	SysUser findByUserName(String username);

	Page<SysUser> findAllByUserNameContaining(String searchText, Pageable pageable);

}